PQuery

Performs a query callback to PageMaker.

PQuery inherits from PCallback


Constructors

PQuery objects may be constructed with one of several overloaded constructors:

PQuery(ePMQuery op, short & aShort);

A query that requires no parameters, and returns a single short value. Refer to PShortQuery.h for the template classes that return short values.
PQuery(ePMQuery op, long & aLong);
A query that requires no parameters and returns a single long value. Refer to PLongQuery.h for the template classes that return long values.
PQuery(ePMQuery op, PMHandle & aHandle);
PQuery(ePMQuery op, void * aBuf, size_t len);
A query class that requires no parameters and returns a variable amount of information.
PQuery(ePMQuery op, PRequestBuf & aRequest, short & aShort);
PQuery(ePMQuery op, PRequestBuf & aRequest, long & aLong);
PQuery(ePMQuery op, PRequestBuf & aRequest, PMHandle & aHandle);
PQuery(ePMQuery op, PRequestBuf & aRequest, void * aBuf, size_t len);
These query constructors are similar to those described above, except that the query passes one or more parameters in a PRequestBuf object.

Member functions

void DoQuery(ePMQuery op);
Perform actual query, using inherited CallPageMaker() function
If the callback fails and an exception is thrown, this function deletes any memory that PageMaker may have allocated and rethrows the exception.
void SetRequestBlock(PRequestBuf & aRequest);
Initialize the parameter block with the fields from the PRequestBuf object.
void ClearRequestBlock();
Set the request fields in the callback parameter block to nulls.
The PQuery class is a concrete utility class used by all high level query classes to perform a query callback to PageMaker. \When using PCL, you normally don't need to create PQuery objects, since there are high level classes for all the PageMaker queries.

PQuery objects are ephemeral, and are created on the stack, typically in the constructor of a high level query object. The returned query data is normally managed by the high level object; the data typically outlives the PQuery object that retrieved it. The high level class then defines structure and access to the returned information.


See also

The PCommand low level class


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support